home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Libraries / stdwin / Ports / mac / about.c next >
Encoding:
C/C++ Source or Header  |  1992-11-23  |  1.5 KB  |  61 lines  |  [TEXT/????]

  1. /* MAC STDWIN -- "ABOUT STDWIN" MESSAGE. */
  2.  
  3. #include "macwin.h"
  4. #ifdef MPW
  5. #include <Events.h>
  6. #include <TextEdit.h>
  7. #endif
  8. #ifdef THINK_C_PRE_5_0
  9. #include <EventMgr.h>
  10. #include <TextEdit.h>
  11. #endif
  12.  
  13. /* Default About... message; applications may assign to this.
  14.    You may also assign to about_item in "menu.c", *before*
  15.    calling winit() or winitargs().
  16.    Also see your THINK C licence.
  17. */
  18. char *about_message=
  19.     "STDWIN version 0.9.7 (using THINK C 4.0)\r\r\
  20. Copyright \251 1988, 1989, 1990, 1991 Stichting Mathematisch Centrum, \
  21. Amsterdam\r\
  22. Written by Guido van Rossum (guido@cwi.nl)\r\
  23. CWI, dept. AA, P.O.B. 4079\r1009 AB  Amsterdam, The Netherlands\r\r\
  24. [Option-click in window scrolls as in MacPaint,\r\
  25. Option-click in title sends behind]";
  26.     /* \251 is the (c) Copyright symbol.
  27.        I don't want non-ASCII characters in my source. */
  28.  
  29.  
  30. /* "About ..." procedure.
  31.    This is self-contained -- if you have a better idea, change it.
  32. */
  33.  
  34. void
  35. do_about()
  36. {
  37.     Rect r;
  38.     WindowPtr w;
  39.     EventRecord e;
  40.     
  41.     SetRect(&r, 0, 0, 340, 180); /* XXX Shouldn't be hardcoded */
  42.     OffsetRect(&r, (screen->portRect.right - r.right)/2, 40);
  43.     
  44.     w = NewWindow(
  45.         (Ptr) NULL,    /* No storage */
  46.         &r,        /* Bounds rect */
  47.         "",        /* No title */
  48.         true,         /* Visible */
  49.         altDBoxProc,    /* Plain box with shadow */
  50.         (WindowPtr) -1,    /* In front position */
  51.         false,        /* No go-away box */
  52.         0L);        /* RefCon */
  53.     SetPort(w);
  54.     r = w->portRect;
  55.     InsetRect(&r, 10, 10);
  56.     TextBox(about_message, strlen(about_message), &r, teJustCenter);
  57.     while (!GetNextEvent(mDownMask|keyDownMask, &e))
  58.         ;
  59.     DisposeWindow(w);
  60. }
  61.